using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;

namespace DP.Sharepoint.Workflow.Install
{
	public class SPDActivityReciever : WebConfigModifier 
	{

        protected override void AddConfigurationToWebConfig(Microsoft.SharePoint.Administration.SPWebApplication app)
        {
            string assemblyName = Assembly.GetExecutingAssembly().GetName().FullName;

            base.AddNodeValue(string.Format("authorizedType[@assembly='{0}']", assemblyName), "configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes", string.Format(@"<authorizedType Assembly=""{0}"" Namespace=""DP.Sharepoint.Workflow"" TypeName=""*"" Authorized=""True"" />", assemblyName));

            base.SaveWebConfig(app);

        }

        protected override string OwnerModif
        {
            get { return "DP.Install"; }
        }
    }
}
